/*
 * Copyright (c) 2024. hallele, Inc All rights reserved.
 */

import koi from "@/utils/axios.ts";

// 统一管理接口
enum API {
  CAPTCHA = "/auth/v1/captcha",
  LOGIN = "/auth/v1/login",
  LOGOUT = "/auth/v1/logout"
}

export const getCaptcha = () => {
  return koi.get(API.CAPTCHA);
};

export const login = (params: any) => {
  return koi.post(API.LOGIN, params, {
    headers: {
      "Content-Type": "multipart/form-data"
    }
  });
};

export const logout = () => {
  return koi.get(API.LOGOUT);
};
